package oop;

public class StudentDemo {
    public static void main(String[] args) {
        //创建对象
        Student stu1 = new Student();
        System.out.println("stu1 = " + stu1);
        //对象调属性查看属性
        System.out.println("stu1.name = " + stu1.name);
        System.out.println("args = " + stu1.age);
        System.out.println(stu1.gender);
        //给属性赋值
        stu1.name = "迪丽热巴";
        stu1.age = 18;
        stu1.gender = "女";
        System.out.println("stu1.name = " + stu1.name);
        System.out.println("stu1.gender = " + stu1.gender);
        System.out.println("stu1.age = " + stu1.age);
        //对象调方法
        stu1.eat("切糕");
        stu1.sleep();

    }
}
